package com.hyy.api.domain.customer.bo;

import com.hyy.api.domain.customer.CstmCustomer;
import com.hyy.common.core.validate.AddGroup;
import com.hyy.common.core.validate.EditGroup;
import com.hyy.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 下游客户业务对象 cstm_customer
 *
 * @author ruoyi
 * @date 2025-05-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = CstmCustomer.class, reverseConvertGenerate = false)
public class CstmCustomerBo extends BaseEntity {

    /**
     * 客户ID
     */
    @NotNull(message = "客户ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 客户名称
     */
    private String name;

    /**
     * 客户code
     */
    private String code;

    /**
     * 客户密码
     */
    private String pwd;

    /**
     * ip 白名单
     * 多个ip用逗号分隔
     */
    private String ips;

    /**
     * 状态(1:启用,0:停用)
     */
    private Integer status;

    /**
     * 接入方式（cmpp、http）
     */
    @NotBlank(message = "接入方式（cmpp、http）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String method;

    /**
     * 公司账号id
     */
    @NotNull(message = "公司账号id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long corporateId;

    /**
     * 单价
     */
    @NotNull(message = "单价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal price;

    /**
     * cmpp、http参数
     */
    private String methodParams;


}
